import React from 'react';
import {Route} from 'react-router-dom'
import frame from '../../style/frame.less';
import connect from "react-redux/es/connect/connect";
import * as Actoin from "../services/action";

class Config extends React.Component {

    constructor(props) {
        super(props);
    }

    render() {
        const {enabled, configView} = this.props;
        return (
            /*enabled == "0"*/
            <div className={`${frame.configPanel} ${frame.fade} ${enabled == "0" ? frame.enabled : frame.disabled}`}>
                <div className={frame.panel} style={{height: '100%'}}>
                    <div className={frame.panelContent} style={{width:'32vw',height: '100%', overflow: 'auto'}}>
                        {configView}
                    </div>
                </div>
            </div>
        )
    }
}

const mapStateToProps = (store) => {

    const handleDialogDisplay = (conditionState) => (
        conditionState
    );

    return {
        enabled: handleDialogDisplay(store.brandState),
        configView: store.configView,
    }
};

export default connect(mapStateToProps, Actoin)(Config)
